home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
lisp
/
xlisp
/
amiga
/
xlisp2.arc
/
readme.1st
< prev
next >
Wrap
Text File
|
1988-11-19
|
7KB
|
207 lines
This is a list of new features in XLISP version 2.0 as of 16Dec87:
Symbols have two value cells, one for normal values and one for
function values. SETQ sets the normal value, DEFUN sets the
functional value.
The most important change from version 1.7 to 2.0 of XLISP is that
it is now possible to save XLISP's workspace between sessions. This
feature isn't necessarily part of every implementation of XLISP 2.0
since it is controlled by a compile-time conditional. Check the file
'xlisp.h' to see if the symbol SAVERESTORE is defined for your machine
before you try to use these functions.
The &key lambda list keyword is now supported as are initialization forms
for &optional, &key and &aux parameters. The supplied-p variables are
also supported for &optional and &key parameters.
New functions and special forms:
(save filename) ; *** NOT IN ALL 2.0 IMPLEMENTATIONS ***
(restore filename) ; *** NOT IN ALL 2.0 IMPLEMENTATIONS ***
(subseq string start [end])
(open name &key :direction)
(vector [expr]...)
(block name [expr]...)
(return-from name [value])
(tagbody [tag|expr]...)
(psetq [sym value]...)
(flet ([sym lambda-list [body]...]...) [expr]...)
(labels ([sym lambda-list [body]...]...) [expr]...)
(macrolet ([sym lambda-list [body]...]...) [expr]...)
(unwind-protect expr [expr]...)
(when test [expr]...)
(unless test [expr]...)
(loop [expr]...)
(progv symbols values [expr]...)
(pprint expr [stream])
(string< str1 str2 &key :start1 :end1 :start2 :end2)
(string= str1 str2 &key :start1 :end1 :start2 :end2)
(string> str1 str2 &key :start1 :end1 :start2 :end2)
(string<= str1 str2 &key :start1 :end1 :start2 :end2)
(string/= str1 str2 &key :start1 :end1 :start2 :end2)
(string>= str1 str2 &key :start1 :end1 :start2 :end2)
(string-lessp str1 str2 &key :start1 :end1 :start2 :end2)
(string-equal str1 str2 &key :start1 :end1 :start2 :end2)
(string-greaterp str1 str2 &key :start1 :end1 :start2 :end2)
(string-not-greaterp str1 str2 &key :start1 :end1 :start2 :end2)
(string-not-equal str1 str2 &key :start1 :end1 :start2 :end2)
(string-not-lessp str1 str2 &key :start1 :end1 :start2 :end2)
(string-trim bag string)
(string-left-trim bag string)
(string-right-trim bag string)
(string-upcase string &key :start :end)
(string-downcase string &key :start :end)
(nstring-upcase string &key :start :end)
(nstring-downcase string &key :start :end)
(symbol-function sym)
(send obj msg [expr]...)
(send-super msg [expr]...)
(integerp expr)
(floatp expr)
(stringp expr)
(arrayp expr)
(streamp expr)
(objectp expr)
(fboundp expr)
(characterp expr)
(int-char expr)
(char-int expr)
(read-byte [stream])
(write-byte expr [stream])
(make-string-input-stream string [start [end]])
(make-string-output-stream)
(get-output-stream-string stream)
(get-output-stream-list stream)
(get-lambda-expression closure)
(gcd expr1 expr2)
(macroexpand form)
(macroexpand-1 form)
(format stream fmt &rest args)
The only FORMAT directives that are supported are ~A, ~S, ~% and ~~
for now. You can use NIL as the stream argument to get output to
*standard-output* and T to have a string built and returned as the
value of the FORMAT function. Obviously, you can also use and stream
as the value of the stream argument. Using anything other than T will
cause FORMAT to return NIL.
There is now a real character data type. All functions that are
supposed to return characters (like READ-CHAR) now do.
The reader is now capable of handling both single and multiple escapes.
This means that it is possible to read the symbol |aBc| and get a symbol
with the print name "aBc". The backslash can also be used as a single
escape. The same symbol could have been written \aB\c.
The read table now supports the character types :SESCAPE for single
escape and :MESCAPE for multiple escapes.
The reader also supports the reader macros:
#:symbol an uninterned symbol
#| ... |# a comment
#Onumber an octal number
#Bnumber a binary number
The following symbols preserve a history of values used by the
read-eval-print loop:
- the current input expression
+ the last expression read
++ the previous value of +
+++ the previous value of ++
* the result of the last evaluation
** the previous value of *
*** the previous value of **
The global symbol *PRINT-CASE* was added to control the output case of
symbols. Its default value is :UPCASE which will cause symbols to
be printed in uppercase. You can change it to :DOWNCASE to get symbols
to print in lowercase.
I have added the functions FIRST, SECOND, THIRD, FOURTH and REST as
synonyms for CAR, CADR, CADDR, CADDDR and CDR.
Changed the default value of *print-case* to :upcase.
Added macros to init.lsp for:
(defvar sym &optional val)
(defparameter sym val)
(defconstant sym val)
These symbols control the format in which numbers are printed. They
should be set to printf format strings.
*integer-format* (default is "%d" or "%ld")
*float-format* (default is "%g")
(substr string start [length]) is replaced by:
(subseq string start [end])
(openi name) is replaced by: (open name :direction :input)
(openo name) is replaced by: (open name :direction :output)
OPEN, LOAD, SAVE and RESTORE take strings or symbols as file names.
If a symbol is given, the print name of the symbol is used as the base
filename and the default extension (if any) is appended.
Renamed MEM to ROOM and TRANSCRIPT to DRIBBLE.
Added a trace facility. The evaluator will now print trace
information for function and macro calls. The names of the
functions and macros to trace should be in a list that is stored
as the value of *TRACELIST*.
Added macro definitions for TRACE and UNTRACE to "init.lsp".
Trace output goes to the stream that is the value of *TRACE-OUTPUT*.
Removed the hard wired prompting from READ. There is no longer
an unmatched left paren counter, but the debug level prompt remains.
The symbols *ERROR-OUTPUT* and *DEBUG-IO* have been added and
are bound to streams that are used for error output and debug
i/o respectively.
The symbol *GC-HOOK* has been added. If it is bound to a function
of two arguments, that function will be called after the garbage
collector runs. The two parameters are the total number of nodes
and the number free after the garbage collection.
Added the function (COMMAND-POINT-SIZE <n>) to the Macintosh version
to set the point size for the text in the command window. The default
point size is 9.
The SEND-SUPER function replaces the :SENDSUPER message to objects.
All messages must be sent using either the SEND function or the
SEND-SUPER function. In other words, the syntax:
(Class :new '(a b c))
must now be written as:
(send Class :new '(a b c))
and
(self :sendsuper :msg 1 2 3)
must now be written as:
(send-super :msg 1 2 3)
This is because the CAR of a form is no longer evaluated. To get the
effect of having the function position evaluated, use the FUNCALL form.
The syntax of LOAD has changed from:
(load name [verbose-flag [print-flag]])
to:
(load name &key :verbose :print)